package com.bjsxt.AnonymouseInnerClass;

public class AnonymouseInnerClass {
    public void test1(A a){
        a.run();
    }

    public static void main(String[] args) {
        AnonymouseInnerClass tai = new AnonymouseInnerClass();
        tai.test1(new AA());
        tai.test1(new A(){

            @Override
            public void run() {
                System.out.println("AnonymouseInnerClass.run");
            }
        });
    }


}
class AA implements A{

    @Override
    public void run() {
        System.out.println("AA.run");
    }
}
interface A{
    void run();
}
